package cheme.ProcessModel.Equations;

import java.beans.PropertyChangeEvent;

import cheme.ProcessModel.IModelElement;
import cheme.ProcessModel.IPropertyAware;
import cheme.ProcessModel.Table.WritableField;
import cheme.ProcessModel.Visitors.IModelVisitor;

public class EquationField extends WritableField implements IEquationField
{
	/*
	 * Serialization version identifier. (Set to default for now)
	 */
	
	private static final long serialVersionUID = 1L;

	/**
	 * @param text
	 * @param type
	 */
	public EquationField(IModelElement parent, String text)
	{
		super(parent, text, IPropertyAware.P_EQUATION_TOKEN);
	}
	
	@Override
	protected void handleTextChange(PropertyChangeEvent evt)
	{
		super.handleTextChange(evt);
		super.setText((String)evt.getNewValue());
	}
	
	public Object accept(IModelVisitor ruleChecker)
	{
		return ruleChecker.visit(this);
	}
}
